﻿@using Microsoft.CST.AttackSurfaceAnalyzer.Utils

<div class="top-row pl-4 navbar navbar-dark">
    <a class="navbar-brand" href="">Attack Surface Analyzer</a>
    <button class="navbar-toggler" @onclick="ToggleNavMenu">
        <span class="navbar-toggler-icon"></span>
    </button>
</div>

<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
    <ul class="nav flex-column">
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="" Match="NavLinkMatch.All">
                <span class="oi oi-home" aria-hidden="true"></span> Home
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="guided">
                <span class="oi oi-compass" aria-hidden="true"></span> Guided Mode
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="scan">
                <span class="oi oi-target" aria-hidden="true"></span> Scan
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="monitor">
                <span class="oi oi-pulse" aria-hidden="true"></span> Monitor
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="analyze">
                <span class="oi oi-magnifying-glass" aria-hidden="true"></span> Analyze
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="report">
                <span class="oi oi-document" aria-hidden="true"></span> Report
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="author">
                <span class="oi oi-pencil" aria-hidden="true"></span> Author
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="sandbox">
                <span class="oi oi-pencil" aria-hidden="true"></span> Sandbox
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="configure">
                <span class="oi oi-cog" aria-hidden="true"></span> Configure
            </NavLink>
        </li>
    </ul>
</div>

<div class="bottom-row pl-4 navbar">
    <div class="version">v.@AsaHelpers.GetVersionString()</div>
    <img class="logo" src="images/microsoft-logo.png" alt="Microsoft Corporation Logo" />
</div>

@code {
    private bool collapseNavMenu = true;

    private string NavMenuCssClass => collapseNavMenu ? "collapse" : null;

    private void ToggleNavMenu()
    {
        collapseNavMenu = !collapseNavMenu;
    }
}
